bonsoon's blog |
| latest | about | random
# Random stuff 2026 week 20 ## Schwarz reflection principle. Suppose $f:\overline{H}_{+} \to \mathbf{C}$ is continuous where $f(r) \in \mathbf{R}$, for $r \in \mathbf{R}$, and $\overline{H}_{+}$ denotes the closed upper half plane, and denote $H_{-}$ to be the open lower half plane. Define $F: \mathbf{C} \to \mathbf{C}$ such that $$ F(z) = \cases{f(z) & if \(z \in \overline{H}_{+}\) \\ \overline{f(\overline{z})} & if \(z \in H_{-}\)} $$ We show $F$ is continuous on $\mathbf{C}$. Proof. We argue by preservation of limits. Consider any convergent sequence $z_{n} \to z'$ in $\mathbf{C}$, we have three cases. We will show in each case we have $F(z_{n}) \to F(z')$, whence $F$ is continuous on $\mathbf{C}$. Case $z'\in H_{+}$. As $H_{+}$ is open, there exists some open $U \ni z'$ such that $U \subset H_{+}$. Since $z_{n} \to z'$, there exists some $N$ such that $n \ge N$ implies $z_{n} \in U \subset H_{+}$. As $f$ is continuous on $\overline{H}_{+}$, we have for $n \ge N$, $$ F(z_{n}) = f(z_{n}) \to f(z') = F(z'). $$ Case $z' \in H_{-}$. As $H_{-}$ is open, there exists some open $U \ni z'$ such that $U \subset H_{-}$. Since $z_{n} \to z'$, there exists some $N$ such that $n \ge N$ implies $z_{n} \in U \subset H_{-}$. Now, as $z_{n},z' \in H_{-}$ for $n \ge N$, we have $\bar z_{n}, \bar{z'} \in H_{+}$ for $n \ge N$. Since $f$ continuous on $H_{+}$, we have $$ f(z_{n}) \to f(\bar{z'}) $$ And as complex conjugation $z \mapsto \bar{z}$ is continuous, we have for $n \ge N$, $$ F(z_{n}) = \overline{f(\bar{z}_{n})} \to \overline{f(\bar z')} = F(z'). $$ Case $z' \in \mathbf{R}$. For any sequence $z_{n} \to z'$, we can split it into two subsequences $a_{n}$ and $b_{n}$ where $a_{n} \in \bar H_{+}$ and $b_{n} \in H_{-}$ such that $a_{n}$ and $b_{n}$ *weaves* into $z_{n}$. Suffices to consider if both $a_{n}$ and $b_{n}$ are infinite sequences. Since subsequences of convergent sequences converges to the same limit, we have both $a_{n} \to z'$ and $b_{n} \to z'$. Now, as $a_{n}, z' \in \bar H_{+}$, and $f$ is continuous on $\bar H_{+}$, we have $$ f(a_{n}) \to f(z') $$ and hence $F(a_{n}) = f(a_{n}) \to f(z') = F(z')$. And as for $b_{n} \to z'$, note that $\bar b_{n} \to \bar z' = z'$ (by continuity of conjugation and $z' \in \mathbf{R}$) and $\bar b_{n} \in H_{+}$. So as $f$ continuous, we have $$ f(\bar b_{n}) \to f(z') $$ So by continuity of conjugation once more, we have $$ F(b_{n}) = \overline{f(\bar b_{n})} \to \overline{f(z')} = f(z') = F(z') $$ since $f(z') \in \mathbf{R}$. Since both $F(a_{n}) \to F(z')$ and $F(b_{n}) \to F(z')$, and $z_{n}$ is partitioned into these two subsequences $a_{n}$ and $b_{n}$, we would conclude that $F(z_{n}) \to F(z')$ as well. (one will need to show this if one does not believe this. It is a nice exercise, perhaps we call it the *weaving lemma*. Okay we just prove it below.) Hence $F$ is continuous on $\mathbf{C}$. $\blacksquare$ --- Weaving Lemma. Sure, let us call it that. Let $X$ be a metric space, and let $(x_{n})$ be an infinite sequence in $X$. Let $a(n): \mathbf{N} \to \mathbf{N}$ and $b(n) : \mathbf{N}\to \mathbf{N}$ be two strictly increasing sequences such that the image of $a$ and $b$ is a disjoint partition of $\mathbf{N}$. Suppose that both subsequences $(x_{a(n)})$ and $(x_{b(n)})$ converge to the same limit $x'$ in $X$, then $x_{n} \to x'$ as well. Proof. Fix $\epsilon > 0$. Since both $x_{a(n)} \to z'$ and $x_{b(n)} \to z'$, there exists some common $N$ such that $n \ge N$ implies $$ d(x_{a(n)}, x') < \epsilon \quad \text{and} \quad d(x_{b(n)}, x') < \epsilon. $$ Now take $M = \max(a(N), b(N))$. For $n \ge M$, then we have $n \ge a(N) \ge N$ and $n \ge b(N) \ge N$. Since image of $a$ and $b$ is a disjoint partition of $\mathbf{N}$, we have $n=a(k)$ or $n = b(k)$ for some $k$. If $n = a(k)$ for some $k$, then we have $a(k) \ge a(N)$. This means $k \ge N$ (otherwise if $k < N$, then $a(k) < a(N)$, contradiction). But for $k \ge N$ we have $d(x_{a(k)},x') < \epsilon$, in other words, $d(x_{n},x') < \epsilon$. Same argument for the case of $n = b(k)$ for some $k$. Hence for $n \ge M$, we have $d(x_{n},x') < \epsilon$, namely $x_{n} \to x'$. $\blacksquare$ --- Might be a good simple exercise for novice students. If $a:\mathbf{N} \to \mathbf{N}$ a strictly increasing function, namely $n < m$ implies $a(n) < a(m)$ for all $n , m \in \mathbf{N}$, then (1) If $a(m) \ge a(n)$, then $m \ge n$. (2) For all $k \in \mathbf{N}$, $a(k) \ge k$. Proof. (1) This is just the contrapositive statement. Or, if to the contrary that $m < n$, then we have $a(m) < a(n)$, which contradicts $a(m) \ge a(n)$. (2) We show this by induction. Base case when $k = 1$. Note $a(1) \in \mathbf{N}$, so $a(1) \ge 1$. Suppose for inductive hypothesis that $a(k) \ge k$ for some $k \ge 1$. Then as $k+1 > k$, we have $a(k+1) > a(k)$. So $a(k+1) \ge a(k) + 1$. Which implies $a(k+1) \ge k + 1$, by inductive hypothesis. This is as desired. So by principle of mathematical induction, we have $a(k) \ge k$ for all $k \in \mathbf{N}$. $\blacksquare$ --- There is a second part for the $f, F$ mentioned in the beginning. Suppose further that $f$ is analytic on $H_{+}$, show $F$ is analytic on $\mathbf{C}$. We use rectangular Morera's theorem, which states if $f$ is continuous on a domain $D$ and that for every rectangle $R \subset D$ with sides parallel to the axes is such that $\oint_{\partial R} f(z) dz = 0$, then $f$ is analytic on $D$. So that is what we aim to show, that for every rectangle $R \subset \mathbf{C}$, we have $\oint_{\partial R} F(z) dz = 0$. Note we showed already that $F$ is continuous on $\mathbf{C}$. So take a rectangle $R$ in $\mathbf{C}$. If $R \subset H_{+}$, then as $f$ is analytic on $H_{+}$, by Cauchy's theorem $\oint_{\partial R}f(z) dz = 0$. Since $F(z) = f(z)$ on $H_{+}$, we have $\oint_{\partial R} F(z) dz = 0$. Now we claim $F$ is analytic on $H_{-}$ as well, where $F(z) = \overline{f(\bar{z})}$ for $z \in H_{-}$. We compute $$ \begin{gather} F'(z) = \lim_{h \to 0} \frac{F(z+h) - F(z)}{h} \\ = \lim_{h \to 0} \frac{\overline{f(\overline{z+h})} - \overline{f(\bar{z})}}{h} \\ = \overline{\lim_{\bar h\to 0} \frac{f(\bar z + \bar h) - f(\bar z)}{\bar h}} \\ = \overline{f'(\bar z)} \end{gather} $$ since $\bar z \in H_{+}$ and $f$ is analytic at $\bar{z}$. So $F'(z)$ exists for $z \in H_{-}$, whence $F$ is analytic on $H_{-}$. And if $R$ is rectangle in $H_{-}$, by Cauchy's theorem we have $\oint_{\partial R} F(z) dz = 0$ as well. Now we need to consider a rectangle $R$ that intersects the real axis. Suppose $R$ is such rectangle, then we can write $R = R_{+} + R_{\epsilon} + R_{-}$, where $R_{+}$ is a rectangle strictly in $H_{+}$, $R_{-}$ is a rectangle strictly in $H_{-}$, and $R_{\epsilon}$ is a sliver of rectangle of some $2 \epsilon$ height about the rea axis. We know the contour integrals of $F$ around $R_{+}$ and $R_{-}$ are zero, as $F$ is analytic there. As for $R_{\epsilon}$, we can show $\oint_{\partial R_{\epsilon}} F(z) dz$ can be made arbitrarily small, bounding the vertical segments using $ML$ estimate and extreme value theorem; and bounding the horizontal segments using uniform continuity. Show this as exercise. Details details. This concludes that $\oint_{\partial R} F(z) dz = 0$, so by Morera's theorem, $F$ is analytic on $\mathbf{C}$. ## SP numbers. Let $N$ be a non-negative integer, define its $sp$ value $sp(n)$ to be the the sum of the digits of $n$, multiplied by the product of the digits, in base 10. So $sp(23) = (2 + 3) \cdot 2 \cdot 3 = 30$, and $sp(124) = (1 + 2 + 4) \cdot 1 \cdot 2 \cdot 4 = 56$. Note $sp(0) = 0$ and $sp(1) = 1$. We say a nonnegative integer $N$ is an SP number if $sp(N) = N$. So $0,1$ are SP numbers. Are there others? Are there infinitely many of them? A simple python code shows that there are 4 such SP numbers less than 1000. They are: $$ 0, 1, 135, 144 $$ In fact, letting the program to search up to 1 million, there are no other SP numbers less than 1 million besides those 4. So observe that if there is a digit 0, then $sp$ value is zero. And if positive integer $a \le 10^{n}$, then we have $sp(a) \le sp(10^{n}-1) = sp(9 \cdots 9)$. So if $a \le 10^{n}$, we have $sp(a) \le(9\cdots 9)= (n-1) \cdot 9 \cdot 9^{n-1} = (n-1) 9^{n}$. So for numbers $a \le 10^{n}$ such that $a > (n-1) 9^{n}$, they definitely cannot be SP numbers, since we would have $a > sp(a)$. Let us consider the numbers in the segment $I_{n} = [10^{n-1},10^{n}]$, if $10^{n-1} > (n-1) 9^{n}$, then numbers in that segment cannot be SP numbers. The inequality is equivalent to $$ \left( \frac{10}{9} \right)^{n} > 10(n-1) $$ which the left hand side is exponential while the right hand side is linear. So there exists some $N$ such for all $n \ge N$, the inequality is true. This means for all $n \ge N$, the segment $[10^{n-1},10^{n}]$ has no SP numbers. This then means there are no more SP numbers after $10^{N-1}$. Hence there are finitely many of them! By brute force, one finds that $N = 61$. So all SP numbers must be $< 10^{60}$ (as $10^{60}$ itself will not be an SP number). Namely, an SP number can have at most 60 digits, and hence there are finitely many of them! Now, can we show there are in fact only those 4 nonnegative SP numbers? To brute force check $10^{60}$ numbers? Well, say we use 1 quadrillion ($10^{15}$) many computers where each can compute at 1 quadrillion flops per second, that is, each able to check $10^{15}$ cases per second. Then each second we can check $10^{15} \times 10^{15} = 10^{{30}}$ cases. So of the $10^{60}$ numbers to check, it would take $10^{60} / 10^{30} = 10^{30}$ seconds, which is around $3 \times 10^{22}$ years. The age of the universe is estimated to be at $13$ billion years ($13 \times 10^{9}$). Well, I am almost confident that we do not even have 1 quadrillion computers out there, each capable at computing at 1 quadrillion flops per second as of 2026. Let alone that would take many magnitudes of the age of the universe to compute. So how can we show there are finitely many of them? I'll have to think about this -- how do we prune to decrease the upper bound of cases to check? Ideas. If a positive integer $N$ has a factor of $10 = 2 \cdot 5$, then its $sp$ value is necessarily 0. So perhaps we examine the factorizations of $N$.